
<?php
//MAIN FORM CLASS. ALWAYS BEING USED, INDIRECTLY.
/**
 * Registration Form
 * This form would allow users of the system register with the system
 *
 */

 class Student_Form_NewScale extends Zend_Dojo_Form
 {
	public function __construct($options = null)
		{
		parent::__construct($options);
		Zend_Dojo::enableForm($this);
		$this->setName('NewCourse');
		//$id = new Zend_Form_Element_Hidden('id');

		//User enters his First Name
		 $options = (array(
        'A'    => 'A',
        'A-'   => 'A-',
        'B+'  => 'B+',
        'B' => 'B',
        'B-'  => 'B-',
        'C+'  => 'C+',
        'C' => 'C',
        'C-' => 'C-',
        'D+' => 'D+',
        'D' => 'D',
        'D-' => 'D-',
        'F'=>'F'));

    

            $grade_scale = new Zend_Dojo_Form_Element_ComboBox('grade');
            $grade_scale->setLabel('Choose Grade Equivalent:');
            $grade_scale->addMultiOptions($options);
            $grade_scale->setAutocomplete(true);

                $minimum = new Zend_Dojo_Form_Element_ValidationTextBox('minimum');
		$minimum->setLabel('minimum score')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
                ->addFilter('StringToUpper')
		->addValidator('NotEmpty');

                $maximum = new Zend_Dojo_Form_Element_ValidationTextBox('maximum');
		$maximum->setLabel('maximum score')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
                ->addFilter('StringToUpper')
		->addValidator('NotEmpty');







		$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');

		$this->addElements(array($grade_scale, $minimum, $maximum));
	    $this->addElement($submit);
		//$this->setAction('register');
		$this->setMethod('POST');
		}
}



